const cloud = require('wx-server-sdk');
cloud.init();

exports.main = async (event) => {
  const db = cloud.database();
  return await db.collection('tasks').doc(event._id).remove();
};